#pragma once
#include <fstream>
#include <iostream>
#include <nlohmann/json.hpp>
#include <string>
#include <vector>

#include "rule.hpp"

struct Config
{
    std::vector<Rule> rules;

    Config(const std::string &filename)
    {
        auto f = std::fstream(filename, std::ios::in);
        nlohmann::json j = nlohmann::json::parse(f);
        for (auto &rule : j["rules"])
        {
            rules.emplace_back(rule);
        }
    }
};
